import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant, { Lazyload } from 'vant'
import loadingDirective from '@/components/Loading/directive'
import noResultDirective from '@/components/NoRes/directive'
import 'vant/lib/index.css'
import '@/assets/scss/index.scss'

const app = createApp()
app.use(Lazyload)
// 注册时可以配置额外的选项
app.use(Lazyload, {
  lazyComponent: true
})

createApp(App)
  .use(store)
  .use(router)
  .use(Vant)
  .directive('loading', loadingDirective)
  .directive('nores', noResultDirective)
  .mount('#app')
